<%--
  Created by IntelliJ IDEA.
  User: HYGK-PC
  Date: 2022/3/23
  Time: 14:47
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!-- 左边的菜单 -->
<div class="col-sm-2">
    <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
        <mbody>
            <c:forEach var="menu" items="${mlist}">
                <div class="panel panel-default">
                    <div class="panel-heading" role="tab" id="headingOne">
                        <h4 class="panel-title">
                            <a role="button" data-toggle="collapse" data-parent="#accordion" href="#${menu.id}"
                               aria-expanded="true" aria-controls="collapseOne">
                                    ${menu.m_title}
                            </a>
                        </h4>
                    </div>

                    <c:if test="${menu.id!=1 && menu.id!=5}">
                        <div id="${menu.id}" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="headingOne">
                            <div class="panel-body">
                                <ul class="list-group">
                                    <c:forEach var="li" items="${mlist1}">
                                        <c:if test="${menu.id==li.m_parent}">
                                            <li class="list-group-item"><a
                                                    href="${pageContext.request.contextPath}/menu/menuManger?id=${li.id}">${li.m_title}</a>
                                            </li>
                                        </c:if>
                                    </c:forEach>
                                </ul>
                            </div>
                        </div>
                    </c:if>

<%--                    首页--%>
                    <c:if test="${menu.id==1}">
                        <div id="${menu.id}" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="headingOne">
                            <div class="panel-body">
                                <ul class="list-group">
                                    <li class="list-group-item"><a href="${pageContext.request.contextPath}/menu/menuManger?id=${menu.id}">${menu.m_title}</a></li>
                                </ul>
                            </div>
                        </div>
                    </c:if>

                    <c:if test="${menu.id==5}">
                        <div id="${menu.id}" class="panel-collapse collapse" role="tabpanel"
                             aria-labelledby="headingOne">
                            <div class="panel-body">
                                <ul class="list-group">
                                    <li class="list-group-item"><a href="${pageContext.request.contextPath}/menu/menuManger?id=${menu.id}">${menu.m_title}</a></li>
                                </ul>
                            </div>
                        </div>
                    </c:if>
                </div>
            </c:forEach>
        </mbody>

    </div>
</div>